<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<h:head>
	<title><ui:define name="title">CAE - Control and Automation Environment</ui:define>
	</title>
	<meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
	<style>
.search .rich-menu-item-hover {
	background-color: transparent;
	border-color: transparent;
}

form {
	margin: 0px;
}

body {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
}

#left {
	position: absolute;
	left: 0;
	top: 20px;
	padding: 0;
	width: 250px;
	height: 99%;
	/* works only if parent container is assigned a height value */
	overflow: auto;
	overflow-y: auto;
}

#cont {
	left: 260px;
	position: absolute;
}
</style>
</h:head>

<h:body>
	<!-- ToolBar -->
	<h:form>
		<rich:toolbar>

			<rich:dropDownMenu>
				<f:facet name="label">
					<h:panelGroup>
						<h:outputText value="File" />
					</h:panelGroup>
				</f:facet>
				<rich:menuItem submitMode="ajax" value="New"
					action="#{ddmenu.doNew}">
				</rich:menuItem>
				<rich:menuItem submitMode="ajax" value="New"
					action="#{ddmenu.doNew}">
				</rich:menuItem>
			</rich:dropDownMenu>
			<rich:dropDownMenu>
				<f:facet name="label">
					<h:panelGroup>
						<h:outputText value="File" />
					</h:panelGroup>
				</f:facet>
				<rich:menuItem submitMode="ajax" value="New"
					action="#{ddmenu.doNew}">
				</rich:menuItem>
				<rich:menuItem submitMode="ajax" value="New"
					action="#{ddmenu.doNew}">
				</rich:menuItem>
			</rich:dropDownMenu>

		</rich:toolbar>


		<div id="left">
			<rich:tree value="#{menuBean.menuNodes}" var="menu" style="overflow: auto">
				<rich:treeNode>
					<a4j:commandLink value="#{menu.value}" render="page">
						<a4j:param name="page-url" value="#{menu.url}" assignTo="#{page.url}" />
					</a4j:commandLink>
				</rich:treeNode>
			</rich:tree>
		</div>
	</h:form>

	<div id="cont">
		<a4j:outputPanel ajaxRendered="true">
			<h:outputText value="#{page.url}" />
			<ui:include src="#{page.url}" id="page" />
		</a4j:outputPanel>
	</div>

</h:body>

</html>
